package com.qhy.springcloud.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author qiuhongyu
 * @date 2020/9/25 18:29
 */
@Configuration
public class RestTempleConfig {
    @Bean
    @LoadBalanced  //实现Ribbon负载均衡的注解
    public RestTemplate getRestTemple() {
        return new RestTemplate();
    }
}
